i = 0
while i <= 10:
    print(i)
    i += 1

j = 1
sum = 0
while j <= 100:
    sum = sum + j
    j += 1
print(sum)

result = 0
k = 0
while k <= 100:
    if k % 2 == 0:
        result = result + k
    k += 1
print(result)

# break 当某些条件成立，退出整个循环
# 循环吃5个苹果，吃完第三个吃饱了，第四个和第五个不吃了
ap = 1
while ap <= 5:
    if ap == 4:
        print("吃饱了不吃了")
        break
    print(f'吃了第{ap}个苹果')
    ap += 1

p = 1
while p <= 5:
    if p == 3:
        print("吃到一个大虫子不吃了")
        p += 1
        continue
    print(f'吃了第{p}个苹果')
    p += 1

